import request from '../utils/request'

//查询全部部门
export function selectAllDeptInfo()
{
  return request.get('/depts')
}

//新增部门
export function addDept(dept)
{
  return request.post('/depts', dept)
}

// 根据Id查询部门
export function selectDeptById(id)
{
  return request.get(`/depts/${id}`)
}

// 根据Id删除部门
export function deleteDeptById(id)
{
  return request.delete(`/depts?id=${id}`)
}

// 修改部门
export function updateDept(dept)
{
  return request.put(`/depts`, dept)
}